{% extends "basic/base.html" %}
{% block title %}
Login
{% endblock %}
{% block content %}

  {% if form.errors %}
    <p class="error">Sorry, that's not a valid username or password</p>
  {% endif %}

{% if user.is_authenticated %}
  <p>Allready logged in, {{ user.username }}. <a href='/'>GOOOOOO BAAACK!.</a></p>
  <p> <a href='/accounts/logout'>Logout.</a></p>
{% else %}
  <form action="" method="post">
    <label for="username">User name:</label>
    <input type="text" name="username" value="" id="username">
    <label for="password">Password:</label>
    <input type="password" name="password" value="" id="password">

    <input type="submit" value="login" />
    <input type="hidden" name="next" value="/" />
  </form>
{% endif %}

{% endblock %}
